<modalbox:modalIncludes />
<div id="listaDeAlugueis" class="dialog">
	<h3 class="subtitulo"><g:message code="Historico de alugueis" /></h3>
	<br />
	<table cellpadding="2" cellspacing="0" class="tabelaAzul">
		<g:if test="${listaAlugueis.size == 0}">
				<tr>
					<td><g:message code="Nenhum aluguel a ser exibido"  /></td>
				
				</tr>
		</g:if>
		<g:else>
			<thead>
				<tr>
					<th class="cabecalhoTabela"><g:message code="Cliente" /></th>
					<th  class="cabecalhoTabela"><g:message code="Inicio" /></th>
					<th  class="cabecalhoTabela"><g:message code="Fim" /></th>
				</tr>
			</thead>
			<tbody>
				<g:each in="${listaAlugueis}" status="i" var="aluguelAtual">
						<g:if test="${ i % 2 == 0 }">
				            	<tr>                        	 	                        
			            </g:if>
			            <g:else>
			                	<tr class="linhaAzulClara">
						</g:else>
						<!-- Caso precise exibir alguma coisa depois
						<td>
							<modalbox:createLink controller="aluguelMaquina" action="show" id="${aluguelAtual.cliente.id}" title="Aluguel" width="400">
		        				${fieldValue(bean: aluguelAtual, field: "cliente")}
		    				</modalbox:createLink>
						</td>
						 -->
						
						<td>${fieldValue(bean: aluguelAtual, field: "cliente")}</td>
	                        
	                    <td><g:formatDate date="${aluguelAtual.inicioValidade}" /></td>
	                        
	                    <td><g:formatDate date="${aluguelAtual.fimValidade}" /></td>
					</g:each>
			</tbody>
		</g:else>
	</table>
</div>